<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('展会名单列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="eventRoster-form">
                <div class="select-list">
                    <ul>
                        <li>
                            展会分类：<select id="sortId" name="sortId">
                            <option value="">所有</option>
                            <option th:each="post:${eventSort}" th:value="${post.sortId}" th:text="${post.sortName}"></option>
                        </select>
                        </li>
                        <li>
                            名单名称：<input type="text" name="eventName"/>
                        </li>
                        <li class="select-time">
                            <label>展会时间： </label>
                            <input type="text" class="time-input" id="startTime" placeholder="开始时间" data-type="datetime" data-format="yyyy-MM-dd HH:mm:ss" name="params[beginTime]"/>
                            <span>-</span>
                            <input type="text" class="time-input" id="endTime" placeholder="结束时间" data-type="datetime" data-format="yyyy-MM-dd HH:mm:ss" name="params[endTime]"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var prefix = ctx + "system/event";
    var datas = [[${@dict.getType('sys_order_status')}]];


    $(function() {
        var options = {
            url: prefix + "/myList",
            sortName: "regionId",
            modalName: "我的申请记录",
            columns: [{
                checkbox: true
            },
                {
                    field: 'regionId',
                    title: '展会名单编号'
                },
                {
                    field: 'sortName',
                    title: '展会分类名称'
                },
                {
                    field: 'eventName',
                    title: '展会名单名称'
                },
                {
                    field: 'eventProfiles',
                    title: '展会简介'
                },
                {
                    field: 'eventAddress',
                    title: '展会地址'
                },
                {
                    field: 'startTime',
                    title: '开始时间'
                },
                {
                    field: 'endTime',
                    title: '结束时间'
                },
                {
                    field: 'eventNum',
                    title: '摊位总编号'
                },
                {
                    field: 'orderStatus',
                    title: '申请状态',
                    align: 'center',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(datas, value);
                    }
                }]
        };
        $.table.init(options);
    });
</script>
</body>
</html>